﻿using MESPro.Controls;
using MESPro.Models.FunctionType;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;

namespace MESPro.Models
{
    /// <summary>
    /// 控件的所有属性,根据这个信息会映射成为一个对象
    /// </summary>
    public class Style
    {
        /// <summary>
        /// 一般用于控件的Name属性
        /// </summary>
        public string? Name { get; set; }
        /// <summary>
        /// 一般用于控件的Text属性,文本框和Label等
        /// </summary>
        public string? Text { get; set; }
        /// <summary>
        /// 控件的标题,比如自定义labelTextBox控件
        /// </summary>
        public string? Title { get; set; }
        /// <summary>
        /// 存储过程
        /// </summary>
        public StoreProInfo? StoredProcedure { get; set; }
        /// <summary>
        /// 控件的完全限定名
        /// </summary>
        public string? FullName { get; set; }
        /// <summary>
        /// 语言(字典),Text属性会根据枚举Language到这里取应该显示什么值
        /// </summary>
        public DisLanguage DisLanguage { get; set; } = new DisLanguage();
        /// <summary>
        /// 控件的左上角坐标
        /// </summary>
        public Point Location { get; set; }
        /// <summary>
        /// 控件的大小
        /// </summary>
        public Size Size { get; set; }
        /// <summary>
        /// 控件的停靠位置
        /// </summary>
        public DockStyle Dock { get; set; }
        /// <summary>
        /// 背景色
        /// </summary>
        public Color BackColor { get; set; }
        /// <summary>
        /// 前景色
        /// </summary>
        public Color ForeColor { get; set; }
        /// <summary>
        /// 内容文字对齐方式
        /// </summary>
        public ContentAlignment TextAlign { get; set; }
        /// <summary>
        /// picbox特有的属性
        /// </summary>
        public string? ImageSource { get; set; }
        /// <summary>
        /// 当按钮被点击时候,是否先弹出一个框来,以及框的样式
        /// </summary>
        public MsgBoxOption MsgBoxOption { get; set; } = new();
        /// <summary>
        /// 数据源:对于有数据源的控件
        /// </summary>
        public object? DataSource { get; set; }














        public string? ToolTipText { get; set; }
        [Editor(typeof(PropertyReturnFileName),
typeof(System.Drawing.Design.UITypeEditor))]
        public string ImageKey2 { get; set; } = "";
        public Font Font { get; set; }

        public int Order { get; set; }
    }
}
